﻿
namespace Patterns4Net.Core.Patterns
{
    using Mono.Cecil;

    /// <summary>
    /// Defines common interface for 'wrapper' patterns such as <see cref="Adapter"/>.
    /// </summary>
    public interface IWrapper
    {
        /// <summary>
        /// Gets the type whose instance is wrapped.
        /// </summary>
        TypeReference WrappedType { get; }

        /// <summary>
        /// Gets the target interface that the <see cref="WrapperType"/> implements.
        /// </summary>
        TypeReference TargetInterface { get; }

        /// <summary>
        /// Gets the class that does the wrapping. 
        /// It wraps <see cref="WrappedType"/> and provides <see cref="TargetInterface"/>.
        /// </summary>
        TypeDefinition WrapperType { get; }
    }
}
